---
id: 655a158c7e80c810f6eff1e1
title: ステップ 17
challengeType: 20
dashedName: step-17
---

# --description--

Inside your `elif` clause, replace `pass` with a call to the `_insert` method on the right child of the current node. Assign the result to the `right` attribute of the current node.

# --hints--

You should call the `self._insert()` method passing `node.right` and `key` as the arguments.

```js
({ test: () => assert.match(code, /self\._insert\(\s*node\.right\s*,\s*key\s*\)/) });
```

You should assign the result of your `self._insert()` call to the right attribute (`node.right`) of the current node.

```js
({ test: () => assert.match(code, /node\.right\s*=\s*self\._insert\(\s*node\.right\s*,\s*key\s*\)/) });
```

# --seed--

## --seed-contents--

```py
class TreeNode:
    def __init__(self, key):
        self.key = key
        self.left = None
        self.right = None

class BinarySearchTree:
    def __init__(self):
        self.root = None

    def insert(self,key):
        self.root = self._insert(self.root, key)

    def _insert(self, node, key):
        if node is None:
            return TreeNode(key)
        if key < node.key:
            node.left = self._insert(node.left, key)
--fcc-editable-region--
        elif key > node.key:
            pass
--fcc-editable-region--
```
